package com.itheima.tlias.controller;

import com.itheima.tlias.common.result.Result;
import com.itheima.tlias.pojo.po.LoginParam;
import com.itheima.tlias.service.LoginService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class LoginController {
    @Resource
    private LoginService loginService;
    @PostMapping("/login")
    public Result login(@Validated @RequestBody LoginParam param){
        return loginService.login(param);
    }
}
